package Cursus.Listeners;

import javax.swing.*;
import java.awt.*;

// Main bij EigenBorder.java en MyCellRenderer.java

public class Test1 extends JFrame {
    public Test1() {
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        Container c = this.getContentPane();
        c.setLayout(new FlowLayout());

        Object[] twee = new Object[5];
        twee[0] = new JButton("Tof");
        JButton b = new JButton("Test");
        b.setBorder(new EigenBorder());
        twee[1] = b;
        twee[2] = new JButton("Tweede button");
        twee[3] = new JTextField("Vierde lijn");
        twee[4] = new JTextField("Vijfde lijn");

        JList l = new JList(twee);
        l.setCellRenderer(new MyCellRenderer());

        c.add(l);
    }

    public static void main(String args[]) {
        System.out.println("Starting test...");
        Test1 mainFrame = new Test1();
        mainFrame.setSize(400, 400);
        mainFrame.setTitle("Test");
        mainFrame.setVisible(true);
    }
}
